Imports Microsoft.VisualBasic
Namespace VNDPOS.Entity
    Public Class User
        Inherits BaseEntity
        Private _UserID As String
        Public Property UserID() As String
            Get
                Return _UserID
            End Get
            Set(ByVal value As String)
                _UserID = value
            End Set
        End Property
        Private _DepartmentID As String
        Public Property DepartmentID() As String
            Get
                Return _DepartmentID
            End Get
            Set(ByVal value As String)
                _DepartmentID = value
            End Set
        End Property
        Private _LocationID As String
        Public Property LocationID() As String
            Get
                Return _LocationID
            End Get
            Set(ByVal value As String)
                _LocationID = value
            End Set
        End Property
        Private _Username As String
        Public Property Username() As String
            Get
                Return _Username
            End Get
            Set(ByVal value As String)
                _Username = value
            End Set
        End Property
        Private _Passwd As String
        Public Property Passwd() As String
            Get
                Return _Passwd
            End Get
            Set(ByVal value As String)
                _Passwd = value
            End Set
        End Property
        Private _Title As String
        Public Property Title() As String
            Get
                Return _Title
            End Get
            Set(ByVal value As String)
                _Title = value
            End Set
        End Property
        Private _FullName As String
        Public Property FullName() As String
            Get
                Return _FullName
            End Get
            Set(ByVal value As String)
                _FullName = value
            End Set
        End Property
        Private _Position As String
        Public Property Position() As String
            Get
                Return _Position
            End Get
            Set(ByVal value As String)
                _Position = value
            End Set
        End Property
        Private _Phone As String
        Public Property Phone() As String
            Get
                Return _Phone
            End Get
            Set(ByVal value As String)
                _Phone = value
            End Set
        End Property
        Private _Mobile As String
        Public Property Mobile() As String
            Get
                Return _Mobile
            End Get
            Set(ByVal value As String)
                _Mobile = value
            End Set
        End Property
        Private _Email As String
        Public Property Email() As String
            Get
                Return _Email
            End Get
            Set(ByVal value As String)
                _Email = value
            End Set
        End Property
        Private _ActiveCode As String
        Public Property ActiveCode() As String
            Get
                Return _ActiveCode
            End Get
            Set(ByVal value As String)
                _ActiveCode = value
            End Set
        End Property
        Private _Active As Boolean
        Public Property Active() As Boolean
            Get
                Return _Active
            End Get
            Set(ByVal value As Boolean)
                _Active = value
            End Set
        End Property
        Private _CompanyID As String
        Public Property CompanyID() As String
            Get
                Return _CompanyID
            End Get
            Set(ByVal value As String)
                _CompanyID = value
            End Set
        End Property
        Public Overrides Function ToString() As String
            Dim buf As String = Me.UserID & ", " & Me.DepartmentID & ", " & Me.LocationID & ", " & Me.Username & ", " & Me.Passwd & ", " & Me.Title & ", " & Me.FullName & ", " & Me.Position & ", " & _
                                Me.Phone & ", " & Me.Mobile & ", " & Me.Email & ", " & Me.ActiveCode & ", " & Me.Active & ", " & Me.CompanyID
            buf &= MyBase.ToString()
            Return buf
        End Function
        Public Overloads Function compareAndGetDiff(ByVal _NewObj As User) As String
            Dim buf As String = ""
            If Me.DepartmentID <> _NewObj.DepartmentID Then
                buf &= "DepartmentID=" & Me.DepartmentID & " -> " & _NewObj.DepartmentID & " "
            End If
            If Me.LocationID <> _NewObj.LocationID Then
                buf &= ", LocationID=" & Me.LocationID & " -> " & _NewObj.LocationID & " "
            End If
            If Me.Username <> _NewObj.Username Then
                buf &= ", Username=" & Me.Username & " -> " & _NewObj.Username & " "
            End If
            If Me.Passwd <> _NewObj.Passwd Then
                buf &= ", Passwd=" & Me.Passwd & " -> " & _NewObj.Passwd & " "
            End If
            If Me.Title <> _NewObj.Title Then
                buf &= ", Title=" & Me.Title & " -> " & _NewObj.Title & " "
            End If
            If Me.FullName <> _NewObj.FullName Then
                buf &= ", FullName=" & Me.FullName & " -> " & _NewObj.FullName & " "
            End If
            If Me.Position <> _NewObj.Position Then
                buf &= ", Position=" & Me.Position & " -> " & _NewObj.Position & " "
            End If
            If Me.Phone <> _NewObj.Phone Then
                buf &= ", Phone=" & Me.Phone & " -> " & _NewObj.Phone & " "
            End If
            If Me.Mobile <> _NewObj.Mobile Then
                buf &= ", Mobile=" & Me.Mobile & " -> " & _NewObj.Mobile & " "
            End If
            If Me.Email <> _NewObj.Email Then
                buf &= ", Email=" & Me.Email & " -> " & _NewObj.Email & " "
            End If
            If Me.ActiveCode <> _NewObj.ActiveCode Then
                buf &= ", ActiveCode=" & Me.ActiveCode & " -> " & _NewObj.ActiveCode & " "
            End If
            If Me.Active <> _NewObj.Active Then
                buf &= ", Active=" & Me.Active & " -> " & _NewObj.Active & " "
            End If
            If Me.CompanyID <> _NewObj.CompanyID Then
                buf &= ", CompanyID=" & Me.CompanyID & " -> " & _NewObj.CompanyID & " "
            End If
            buf &= MyBase.compareAndGetDiff(_NewObj)
            Return buf
        End Function
    End Class
End Namespace
